function [CSELM_Weight, CSELM_bias] = generate_CSELM_Weight(data_train, rand_label, random_indices, CSELM_threshold,Deactivation_ratio)
    CSELM_Weight = [];
    CSELM_bias = [];
    % 获取 data_train 的列数
    [~, num_cols] = size(data_train);
    if num_cols > 900
        % 计算要置零的列数
        num_cols_to_zero = round(Deactivation_ratio * num_cols);
        % 生成一个长度为 num_cols 的随机排列
        random_cols = randperm(num_cols);
        % 将前 num_cols_to_zero 列的数据置为 0
        data_train(:, random_cols(1:num_cols_to_zero)) = 0;
    end
    CSELM_list = find_same_pairs(rand_label);
    %     try
    if ~isempty(CSELM_list)
        CSELM_list = [random_indices(CSELM_list(:, 1)), random_indices(CSELM_list(:, 2))];
    %     catch exception
    %         % 处理错误的代码
    %         disp('发生错误！');
    %         disp(exception.message); % 输出错误信息
    %     end
    
    
        for i = 1:size(CSELM_list, 1)
            sample_temp1 = data_train(CSELM_list(i, 1), 2:end);
            sample_temp2 = data_train(CSELM_list(i, 2), 2:end);
            
            Weight_temp = sample_temp1 + sample_temp2;
            NormWeight = dot(Weight_temp, Weight_temp);
            
            if NormWeight >= CSELM_threshold
                Weight_temp = Weight_temp ./ (NormWeight / 2);
                bias_temp = rand(1, 1);
                
                CSELM_Weight = [CSELM_Weight; Weight_temp];
                CSELM_bias = [CSELM_bias, bias_temp];
            end
        end
    end
end
